<?php
error_reporting(0);
session_start();
define('WWWROOT',dirname(__FILE__)."/");
if (!file_exists(WWWROOT.'../install/install.lock')){
    die('检测到程序未安装，<a href="./install/">点我前往安装界面</a>');
}
date_default_timezone_set('PRC');
include 'function.php';
include 'config.php';
try {
$pdo=new PDO("mysql:host={$con['dbhost']};dbname={$con['dbname']};port={$con['dbport']};charset=utf8",$con['dbuser'],$con['dbpass']);
$homedata=$pdo->prepare("SELECT * FROM 9g_index");
$homedata->execute();
$home=$homedata->fetch(PDO::FETCH_ASSOC);
}catch (PDOException $e){
    die('数据库信息出错:'.$e->getMessage());
}